package sv.gob.mh.dgii.dao.cc;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.beanutils.DynaBean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Query;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import sv.gob.mh.dgii.common.Utils;
import sv.gob.mh.dgii.dao.hibernate.HibernateDaoImpl;
import sv.gob.mh.dgii.exceptions.SiitDaoException;
import sv.gob.mh.dgii.model.CcSolicitudes;

@Repository
public class CcSolicitudesDaoImpl extends HibernateDaoImpl implements CcSolicitudesDao {

    Log log = LogFactory.getLog(CcSolicitudesDaoImpl.class);

    public CcSolicitudesDaoImpl() {
        super(CcSolicitudes.class); 
	} 
    
    public CcSolicitudes findSolicitudActivaByNit(CcSolicitudes example){
                    DetachedCriteria dc = DetachedCriteria.forClass(getClazz());
                    dc.add(Restrictions.eq("snitContrib", example.getSnitContrib()));				
                    return (CcSolicitudes) getFirstFromList(executeCriteria(dc));
            }
    
}